#ifndef INCLUDED_BEZIER_CURVE_EVALUATOR_H
#define INCLUDED_BEZIER_CURVE_EVALUATOR_H

#pragma warning(disable : 4786)  

#include "CurveEvaluator.h"
#include "vec.h"
#include "mat.h"

//using namespace std;

static const double BEZIER_EPSILON_FLAT = 0.1;
const double BEZIER_PARAMETER_SAMPLE = 0.005;

class BezierCurveEvaluator : public CurveEvaluator
{

public:
	void evaluateCurve(const std::vector<Point>& ptvCtrlPts, 
		std::vector<Point>& ptvEvaluatedCurvePts, 
		const float& fAniLength, 
		const bool& bWrap) const;

	std::vector<Point> getBezier(Point v0, Point v1, Point v2, Point v3) const;
	bool flatEnough(Point v0, Point v1, Point v2, Point v3);
	void subDivide(Point v0, Point v1, Point v2, Point v3, std::vector<Point>& r1, std::vector<Point>& r2);

};

#endif